package com.veryedu.hibernate.hbm.dao;

import java.util.Collection;
import java.util.List;

import org.hibernate.Session;

public interface BaseDao {
	public Session getSession();
	public void closeSession(Session session);
	
	public Object add(Object entity);
	public boolean delete(Object entity);
	public boolean delete(Class clazz, int id);
	public boolean deleteTableData(Class entity);
	public boolean deleteByEntities(Collection entities);
	public boolean update(Object entity);
	public Object getByPk(Class clazz, int id);
	public List findAll(Class clazz);
	public List findByProperty(Class clazz, String propertyName, Object value);
	
}
